package socket;

/**
 * @author huyong
 * @version 1.0.0
 * @description
 * @date 2015/5/26 18:04
 */
public class ListenStart {
	public static void main(String[] args) throws Exception{
		//InitSocket.init("127.0.0.1", 9999);
		new ReceiveSocket().start();
		new KeepAlive().start();
		send();
		Thread.sleep(30000);
		send();
	}

	private static void send()throws Exception{
		String xml = "client_request:" + System.currentTimeMillis();
		xml = xml.length() + xml;
		SendSockets.sendSocket("127.0.0.1", 9999, xml.getBytes("UTF-8"));
	}
}
